package com.example.zy.vote1.services.impl;


import com.example.zy.vote1.bean.User;
import com.example.zy.vote1.mapper.UserMapper;
import com.example.zy.vote1.services.UserServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServicesImpl implements UserServices {
    @Autowired
    UserMapper userMapper;
    @Override
    public User login(User user) {
        User fUser = userMapper.findByName(user.getName(),user.getPwd());
        return fUser;
    }

    @Override
    public List<User> getUserListByPage(Integer page, Integer limt) {
        List<User> userlist = userMapper.getUserListByPage(page,limt);
        return userlist;
    }
}
